Skip to content

chore: Extract some tied down logic#3374

Merged
andygrove merged 3 commits into
apache:mainfrom
EmilyMatt:extract-logic
Feb 3, 2026
Merged

chore: Extract some tied down logic#3374
andygrove merged 3 commits into
apache:mainfrom
EmilyMatt:extract-logic

Conversation

@EmilyMatt
Copy link
Copy Markdown
Contributor

@EmilyMatt EmilyMatt commented Feb 3, 2026

Which issue does this PR close?

Towards #3354

Rationale for this change

Starts separating code so moving the partitioners out of the shuffle_writer file will not look like a mess.

What changes are included in this PR?

  1. Moved metrics into a separate file.

  2. Renamed the struct ShufflePartitionerMetrics, there is some inconsistent use of "partitioner" and "repartitioner" throughout the module, I think partitioner fits better since we only deal from the context of a single partition at all times, and regardless of which variation is chosen I think it's better to make everything uniform.

  3. Moved the function that aligns the scratch space with the current buffered batches into the ScratchSpace struct itself, it seems very logical due to the function signature and its actual logic.
    Did this mostly because it moves out a big chunk of code that was "stuck" inside the partitioner logic itself, which will make changes there look a bit messy.

How are these changes tested?

By the usual tests, as there is no change in logic.

# Conflicts:
#	native/core/src/execution/shuffle/mod.rs
Copy link
Copy Markdown
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @EmilyMatt

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.03%. Comparing base (f09f8af) to head (2371158).
⚠️ Report is 1228 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3374      +/-   ##
============================================
+ Coverage     56.12%   60.03%   +3.90%     
- Complexity      976     1475     +499     
============================================
  Files           119      175      +56     
  Lines         11743    16179    +4436     
  Branches       2251     2686     +435     
============================================
+ Hits           6591     9713    +3122     
- Misses         4012     5112    +1100     
- Partials       1140     1354     +214     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andygrove andygrove merged commit 7b61b30 into apache:main Feb 3, 2026
123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants